package com.tedu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.DataOutput;

/**
 * 测试  入口
 */
public class Test {
    public static void main(String[] args) {
        //加载spring的配置文件  启动spring
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");

        //获取dog对象
        Dog dog = (Dog) applicationContext.getBean("dog");

        System.out.println(dog);

        //  获取 person
        Person person = (Person) applicationContext.getBean("person");
        System.out.println(person);
    }
}
